package com.nervenets.shopping.hibernate.domain.common;

import com.nervenets.general.hibernate.DomainObject;
import com.nervenets.shopping.enumeration.CheckStatus;
import com.nervenets.shopping.enumeration.Gender;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 身份证信息
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Table
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IdCard extends DomainObject {
    @ApiModelProperty(value = "关联人ID")
    private long unionId;
    @ApiModelProperty(value = "姓名")
    private String name;
    @ApiModelProperty(value = "性别")
    private Gender gender;
    @ApiModelProperty(value = "民族")
    private String nation;
    @ApiModelProperty(value = "生日")
    private long birthday;
    @ApiModelProperty(value = "地址")
    private String address;
    @ApiModelProperty(value = "身份证号码")
    private String number;
    @ApiModelProperty(value = "有效期开始")
    private long validStartTime;
    @ApiModelProperty(value = "有效期结束")
    private long validEndTime;
    @ApiModelProperty(value = "签发机构")
    private String signedOrgan;
    @ApiModelProperty(value = "正面图")
    private String frontImage;
    @ApiModelProperty(value = "背面图")
    private String backImage;
    @ApiModelProperty(value = "审核状态")
    @Column(columnDefinition = "tinyint")
    private CheckStatus checkStatus = CheckStatus.checking;
}
